#pragma once

#include "IGameState.h"

// SGD Wrappers
#include "SGD Wrappers/CSGD_Direct3D.h"
#include "SGD Wrappers/CSGD_DirectInput.h"
#include "SGD Wrappers/CSGD_TextureManager.h"

#include "BitmapFont.h"

struct GameSave
{
	int numPlayers;
	int numPieces;
	int purchased[10];
	int numMetal;
	int numCircuitry;

	// Player 2
	int purchasedP2[10];
	int numMetalP2;
	int numCircuitryP2;
};

class LoadGameState : public IGameState
{
public:
	static LoadGameState* GetInstance();

	void Enter();

	void Exit();

	bool Input();

	void Update(float elapsed);

	void Render();
	
	TCHAR loadStr	[11];
	TCHAR pro1Str	[10];
	TCHAR pro2Str	[15];
	TCHAR pro3Str	[10];
	TCHAR backStr	[10];
	TCHAR playersStr[10];

	GameSave saves[3];

private:
	CSGD_Direct3D*				D3D;
	CSGD_DirectInput*			DI;
	CSGD_TextureManager*		TM;

	CBitmapFont* GroupFont;

	// Image variables
	int	FontImageID;
	int loadScreenID[4];
	int altLoadID;
	int buttonA;
	int buttonX;
	int buttonB;

	bool selected;

	int select;
	bool twoPlayer;

	LoadGameState(void);
	LoadGameState(const LoadGameState&);
	LoadGameState& operator=(const LoadGameState&);
	virtual ~LoadGameState(void);

	// Sound for delete
	int menuDelete;

};
